<table class="am-table am-text-nowrap am-text-center">
    <thead>
    <tr>
        <th>商品信息</th>
        <th class="am-text-center">规格</th>
        <th class="am-text-center">单价</th>
        <th class="am-text-center">数量</th>
        <th class="am-text-center">小计</th>
    </tr>
    </thead>
    <tbody>
    @foreach($goods as $item)
        <tr>
            <td class="am-text-left">
                <img class="am-block am-fl am-margin-left-0 am-margin-right-sm" src="{{str_first($item->goods_images)}}">
                <div class="am-line2 am-padding-top-sm">{{$item->goods_name}}</div>
                <input type="hidden" name="specs[{{$item->goods_id}}]" value="{{$specs[$item['goods_id']]}}">
                <input type="hidden" name="goods_id[]" value="{{$item->goods_id}}">
                <input type="hidden" name="number[{{$item->goods_id}}]" value="{{$buy_num[$item['goods_id']]}}">
            </td>
            <td><em class="am-padding-left-xs">
                    {{spec_title($specs[$item['goods_id']],$item['goods_id'])}}
                </em>
            </td>
            <td>{{number_format($item->price,2)}}元</td>
            <td>{{$buy_num[$item['goods_id']]}}</td>
            <td class="am-text-danger">
                {{$item->price*($buy_num[$item['goods_id']])}}元
            </td>
        </tr>
     @endforeach
    </tbody>
</table>